package com.alex.utils.html;

public class CheckBox extends Input {

	private boolean checked;

	public CheckBox(String name, String value, boolean checked) {

		super(name, value);

		this.checked = checked;

		if (value != null)
			this.value = value;
		else
			this.value = "on";

	}

	public String getValue() {
		
		if (checked)
			return value;
		else
			return null;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}

}
